package dao;

import java.sql.*;




public class Conexao{  

	private String driver = "com.mysql.jdbc.Driver";
	private String url = "jdbc:mysql://localhost:3306/enfase";
	private String login = "root";
	private String senha = "";
	
	
	
	private Connection con;    

	public Conexao() {         

		try {
			Class.forName(driver);
			con = DriverManager.getConnection(url,login, senha);             
		}catch (Exception e) {			
			e.printStackTrace();			
		}
	}

	public Connection getCon() {
		return con;
	}

	public void fecharConexao(){
		try {
			con.close();
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}
}




